package com.taxi.driver.data.user;

import com.taxi.driver.data.entity.AssessmentEntity;
import com.taxi.driver.data.entity.BillEntity;
import com.taxi.driver.data.entity.CancelReasonEntity;
import com.taxi.driver.data.entity.CommentEntity;
import com.taxi.driver.data.entity.ComplainEntity;
import com.taxi.driver.data.entity.DriverEntity;
import com.taxi.driver.data.entity.EvaluateEntity;
import com.taxi.driver.data.entity.FeedBackEntity;
import com.taxi.driver.data.entity.HomeEntity;
import com.taxi.driver.data.entity.MessageEntity;
import com.taxi.driver.data.entity.ProblemEntity;
import com.taxi.driver.data.entity.UpdateMsg;
import com.taxi.driver.data.entity.WithdrawalDetailsEntity;
import com.taxi.driver.data.entity.WithdrawaleRecordEntity;
import com.taxi.driver.module.vo.AddressVO;

import java.util.List;

import rx.Observable;

public interface UserSource {

    Observable<String> reqVerifyCode(String phone);

    Observable<DriverEntity> reqLogin(String phone, String pwd);

    Observable<String> reqLogout(double onWorkLng, double onWorkLat, String uploadText);

    Observable<DriverEntity> getUserInfo();

    void refreshUserInfo();

    void setUserInfo(DriverEntity entity);

    boolean isLogin();

    int getCarLevelType();

    Observable<List<WithdrawaleRecordEntity>> widthdrawalRecord(int nowPage);

    Observable<BillEntity> reqBills(int nowPage, int dateType, String start, String end, String type);

    Observable<List<ProblemEntity>> getProblems();

    Observable<List<FeedBackEntity>> getFeedbacks(int nowPage);

    Observable<String> addFeedback(String title, String content);

    Observable<WithdrawalDetailsEntity> getWithdrawalInfo(String cashUuid);

    Observable<String> withdrawal(String cash, String collectAccount, int collectType, String password);

    Observable<AssessmentEntity> reqAssessment(String startTime, String endTime);

    Observable<EvaluateEntity> getEvaluates();

    Observable<List<CommentEntity>> getYesterdayEvaluates(int nowPage);

    Observable<String> resetPw(String newPsw, String oldPsw);

    Observable<String> validate(String phone, String idcard, int driverType);

    Observable<String> sendCode(String mobile);

    Observable<String> verifyCode(String mobile, String identifyCode);

    Observable<String> resetPwd(String mobile, String identifyCode,
                                String idcard, String password, int driverType);

    void setTempDriverEntity(DriverEntity entity);

    DriverEntity getTempDriverEntity();

    Observable<HomeEntity> reqWorkInfo();

    Observable<List<CancelReasonEntity>> reqCancelMsg();

    Observable<List<ComplainEntity>> reqComplainMsg();

    String getLocalDriverUuid(); //获取当前用户的uuid

    List<AddressVO> getHistoryAddr(); //获取历史导航地址

    void saveProvince(String province);

    void saveCity(String city);

    String getProvince();

    String getCity();

    void setNetworkStatus(boolean isDisconnect);

    Observable<List<MessageEntity>> getMsgList(int nowPage, int pageType);

    Observable<UpdateMsg> updateMsg(String uuid, int status);

    Observable<String> deleteAll();

    Observable<String> deleteMsg(String uuid);

    Observable<String> uploadErrorMsg(String errorType, String errorMsg);
}